﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	ConfirmUpload.aspx
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Confirm SubService Upload</h2>
	 <% using (Html.BeginForm())
		{ %>
	<div>
		<fieldset>
			<legend>SubService Information</legend>
			<div class="editor-label">
				SubService Name
			</div>
			<div class="editor-field">
				<%=Model.SubServiceName%>
			</div>
			<div class="editor-label">
				SubService Description
			</div>
			<div class="editor-field">
				<%=Model.SubServiceDescription%>
			</div>
			<div class="editor-label">
				SubService Version
			</div>
			<div class="editor-field">
				<%=Model.Version%>
			</div>
			<div class="editor-label">
				SubService Unique URN
			</div>
			<div class="editor-field">
				<%=Model.UniqueURN%>
			</div>
			<div class="editor-label">
				SubService Parameters
			</div>
			<div class="editor-field">

				<%  System.Text.StringBuilder sb = new StringBuilder();
					foreach (var item in Model.Parameters)
					{
						sb.Append(item.ParameterName).Append("=").Append(item.ParameterDefaultValue).Append(";");
					} 
				%>
				<%=sb.ToString()%>
			</div>
			<div class="editor-label">
				SubService Run Model
			</div>
			<div class="editor-field">
				<%=Model.RunConfig.RunMode%>
			</div>
			<div class="editor-label">
				SubService Run Configuration
			</div>
			<div class="editor-field">
				<%=Model.RunConfig.RunConfig%>
			</div>
			<div class="editor-label">
				SubService Subscription
			</div>
			<div class="editor-field">
				<%  System.Text.StringBuilder sbSubscription = new StringBuilder();
					foreach (var item in Model.Subscriptions)
					{
						sbSubscription.Append(item.MessageRootName).Append(", ").Append(item.MessageNamespace).Append("; <br/>");
					} 
				%>
				<%=sbSubscription.ToString()%>
			</div>
		</fieldset>
		<table>
			<thead>
			<tr>
				<td>
					<div class="editor-label">Dependency Name</div>
				</td>
				
				<td>
					<div class="editor-label">Dependency Type</div>
				</td>
			</tr>
			</thead>
			<tbody>
			<% foreach (var item in this.Model.Dependencies)
			   {%>
			<tr>
				<td>
					<div class="editor-label"><%=item.Name%> </div>
				</td>
				
				<td>
					<div class="editor-label"><%=item.DependencyType%> </div>
				</td>          
			</tr>
			</tbody>
			<% }%> 
		</table>
	</div>
    <h2><%= Html.Encode(ViewData["Message"]) %></h2>
	<%= Html.ActionLink("Back", "../Home/AddSubService")%>
	<%} %>

</asp:Content>
